#ifndef ENDDESTSENDHANDLERBASE_H
#define ENDDESTSENDHANDLERBASE_H

#include "ITransHandler.h"
#include "Log.h"

class EndDestSendHandlerBase:public ITransHandler
{
public:
	EndDestSendHandlerBase():ITransHandler(){}

	~EndDestSendHandlerBase(){}

	virtual ExecuteResultCode Execute(ClientContext&,OVERLAPPED*);

protected:
	virtual void GetRecvSendInfo(ClientContext &client,SOCKET *sock,WSABUF **buffer,WSABUF **weakRefBuffer,OVERLAPPED **ovl,std::string **fullBuffer) abstract;

	virtual std::string::size_type GetPartialTransIndex(ClientContext &client) abstract;

	virtual void SetPartialTransIndex(ClientContext &client,std::string::size_type index) abstract;

	virtual ITransHandler* GetNextHandler() abstract;

	virtual ExecuteResultCode OnExecuteError(ClientContext&,OVERLAPPED*,ExecuteResultCode) abstract;

	virtual void RequestFullSendPostProcess(ClientContext &client) abstract;

private:
	static log4cplus::Logger log;
};

#endif